<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends AdminController {
    public function index(){
    	$this->user = M('user')->select();
    	$this->count = M('user')->count();

    	$this->display();
    }
    public function user_add(){
    	$this->display();
    }
    public function user_del(){
    	$this->display();
    }
    public function user_edit(){
    	$this->display();
    }
    public function user_password(){
    	$this->display();
    }
    //停用用户
    public function user_stop(){
    	$id=I('id');
    	$data['status'] = 2;
    	if(M('user')->where("id='$id'")->save($data)){
    		echo '停用此用户成功';
    	}else{
    		echo 2;
    	}
    }
    //启用用户
    public function user_start(){
    	$id=I('id');
    	$data['status'] = 1;
    	if(M('user')->where("id='$id'")->save($data)){
    		echo '启用此用户成功';
    	}else{
    		echo 2;
    	}
    }
}